<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8;"/>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,Chrome=1"/>
    <meta name="renderer" content="webkit">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <base target="_top"/>
    <title>创新评测报告</title>
    <link href="<%=basePath%>css/bootstrap/css/bootstrap.min.css" type="text/css" rel="stylesheet"/>
    <link href="<%=basePath%>css/basic.css" type="text/css" rel="stylesheet"/>

    <script type="text/javascript" src="<%=basePath%>js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="<%=basePath%>css/bootstrap/js/bootstrap.js"></script>
    <script type="text/javascript" src="<%=basePath%>js/echarts-2.2.7/build/dist/echarts.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->


</head>
<body>
<div class="top">
    <div class="container">
        <img alt="140x140" src="<%=basePath%>images/logo.jpg"/>
    </div>
</div>
<div class="row show-grid daohang">
    <div class="container">
        <div class="daohang-name"><a href="<%=basePath%>page/evaluate.jsp"><strong>评测首页</strong></a></div>
        <div class="daohang-name"><a href="<%=basePath%>template/getTemplateAll"><strong>模板列表</strong></a></div>
        <div class="daohang-name this"><strong>评测结果</strong></div>
    </div>
</div>
<div class="container">
    <div class="col-md-12 column">
        <h3 class="text-center">
            <strong>评测结果</strong>
        </h3>
        <hr/>
        <a class="btn btn-success" href="<%=basePath%>evaluation/dowloadConpany?templateId=${templateId}">生成Excel</a>
    </div>
    <div class="row clearfix boder">
        <div class="col-md-4 column">
            <div class="result_name"><strong>创新能力指数</strong></div>
        </div>
        <div class="col-md-8 column boder report_main" id="part2">
            <div class="bar" id="bar1">
            </div>
        </div>
    </div>
    <div class="row clearfix boder">
        <div class="col-md-4 column">
            <div class="result_name"><strong>创新投入能力</strong></div>
        </div>
        <div class="col-md-8 column boder report_main" id="part3">
            <div class="bar" id="bar2"></div>
        </div>
    </div>

    <div class="row clearfix boder">
        <div class="col-md-4 column">
            <div class="result_name"><strong>创新产出能力</strong></div>
        </div>
        <div class="col-md-8 column boder report_main" id="part4">
            <div class="bar" id="bar3"></div>
        </div>
    </div>

    <div class="row clearfix boder">
        <div class="col-md-4 column">
            <div class="result_name"><strong>创新实现能力</strong></div>
        </div>

        <div class="col-md-8 column boder report_main" id="part5">
            <div class="bar" id="bar4"></div>
        </div>
    </div>
    <div class="row clearfix boder">
        <div class="col-md-4 column">
            <div class="result_name"><strong>创新基础条件</strong></div>
        </div>
        <div class="col-md-8 column boder report_main" id="part6">
            <div class="bar" id="bar5"></div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript">
    $(function () {
        require.config({
            paths: {
                echarts: '<%=basePath%>js/echarts-2.2.7/build/dist'
            }
        });
        require(
                [
                    'echarts',
                    'echarts/chart/bar', // 使用柱状图就加载bar模块，按需加载
                    'echarts/chart/line'
                ],
                function (ec) {
                    // 基于准备好的dom，初始化echarts图表
                    var bar1 = ec.init(document.getElementById('bar1'));
                    var bar2 = ec.init(document.getElementById('bar2'));
                    var bar3 = ec.init(document.getElementById('bar3'));
                    var bar4 = ec.init(document.getElementById('bar4'));
                    var bar5 = ec.init(document.getElementById('bar5'));

                    //创新能力指数
                    var option1 = {
                        title: {
                            text: '综合能力评价',
                            subtext: '前十名数据'
                        },
                        tooltip: {
                            trigger: 'axis'
                        },
                        legend: {
                            data: ['综合能力']
                        },
                        toolbox: {
                            show: true,
                            feature: {
                                mark: {show: true},
                                dataView: {show: true, readOnly: false},
                                magicType: {show: true, type: ['line', 'bar']},
                                restore: {show: true},
                                saveAsImage: {show: true}
                            }
                        },
                        calculable: true,
                        xAxis: [
                            {
                                type: 'category',
                                data: function () {
                                    var result = [];
                                    <c:forEach var="c" items="${comAbility}">
                                    result.push("${c.left}");
                                    </c:forEach>
                                    return result;
                                }()
                            }
                        ],
                        yAxis: [
                            {
                                type: 'value'
                            }
                        ],
                        series: [{
                            name: '综合能力',
                            type: 'line',
                            data: function () {
                                var result = [];
                                <c:forEach var="c" items="${comAbility}">
                                result.push(${c.right}.toFixed(2)
                                )
                                ;
                                </c:forEach>
                                return result;
                            }(),
                            markPoint: {
                                data: [
                                    {type: 'max', name: '最大值'},
                                    {type: 'min', name: '最小值'}
                                ]
                            },
                            markLine: {
                                data: [
                                    {type: 'average', name: '平均值'}
                                ]
                            },
                            itemStyle: {normal: {color: 'rgb(27,178,216)'}}

                        }
                        ]
                    };
                    // 为echarts对象加载数据
                    bar1.setOption(option1);
                    //创新投入能力
                    var option2 = {
                        title: {
                            text: '创新投入能力评价',
                            subtext: '纯属虚构'
                        },
                        tooltip: {
                            trigger: 'axis'
                        },
                        legend: {
                            data: ['创新投入能力']
                        },
                        toolbox: {
                            show: true,
                            feature: {
                                mark: {show: true},
                                dataView: {show: true, readOnly: false},
                                magicType: {show: true, type: ['line', 'bar']},
                                restore: {show: true},
                                saveAsImage: {show: true}
                            }
                        },
                        calculable: true,
                        xAxis: [
                            {
                                type: 'category',
                                data: function () {
                                    var result = [];
                                    <c:forEach var="c" items="${innovateInput}">
                                    result.push("${c.left}");
                                    </c:forEach>
                                    return result;
                                }()
                            }
                        ],
                        yAxis: [
                            {
                                type: 'value'
                            }
                        ],
                        series: [

                            {
                                name: '创新投入能力',
                                type: 'line',
                                data: function () {
                                    var result = [];
                                    <c:forEach var="c" items="${innovateInput}">
                                    result.push(${c.right}.toFixed(2)
                                    )
                                    ;
                                    </c:forEach>
                                    return result;
                                }(),
                                markPoint: {
                                    data: [
                                        {type: "max", name: '最高'},
                                        {type: "min", name: '最低'}
                                    ]
                                },
                                markLine: {
                                    data: [
                                        {type: 'average', name: '平均值'}
                                    ]
                                },
                                itemStyle: {normal: {color: 'rgb(138,217,213)'}}
                            }
                        ]
                    };
                    bar2.setOption(option2);
                    //创新产出能力
                    var option3 = {
                        title: {
                            text: '创新产出能力评价',
                            subtext: '纯属虚构'
                        },
                        tooltip: {
                            trigger: 'axis'
                        },
                        legend: {
                            data: ['创新产出能力']
                        },
                        toolbox: {
                            show: true,
                            feature: {
                                mark: {show: true},
                                dataView: {show: true, readOnly: false},
                                magicType: {show: true, type: ['line', 'bar']},
                                restore: {show: true},
                                saveAsImage: {show: true}
                            }
                        },
                        calculable: true,
                        xAxis: [
                            {
                                type: 'category',
                                data: function () {
                                    var result = [];
                                    <c:forEach var="c" items="${innovateOut}">
                                    result.push("${c.left}");
                                    </c:forEach>
                                    return result;
                                }()
                            }
                        ],
                        yAxis: [
                            {
                                type: 'value'
                            }
                        ],
                        series: [
                            {
                                name: '创新产出能力',
                                type: 'line',
                                data: function () {
                                    var result = [];
                                    <c:forEach var="c" items="${innovateOut}">
                                    result.push(${c.right}.toFixed(2)
                                    )
                                    ;
                                    </c:forEach>
                                    return result;
                                }(),
                                markPoint: {
                                    data: [
                                        {type: "max", name: '最高'},
                                        {type: "min", name: '最低'}
                                    ]
                                },
                                markLine: {
                                    data: [
                                        {type: "average", name: '平均值'}
                                    ]
                                },

                                itemStyle: {normal: {color: 'rgb(182,162,222)'}}
                            }
                        ]
                    };
                    bar3.setOption(option3);
                    //创新实现能力
                    var option4 = {
                        title: {
                            text: '创新实现能力评价',
                            subtext: '纯属虚构'
                        },
                        tooltip: {
                            trigger: 'axis'
                        },
                        legend: {
                            data: ['创新实现能力']
                        },
                        toolbox: {
                            show: true,
                            feature: {
                                mark: {show: true},
                                dataView: {show: true, readOnly: false},
                                magicType: {show: true, type: ['line', 'bar']},
                                restore: {show: true},
                                saveAsImage: {show: true}
                            }
                        },
                        calculable: true,
                        xAxis: [
                            {
                                type: 'category',
                                data: function () {
                                    var result = [];
                                    <c:forEach var="c" items="${innovatePractical}">
                                    result.push("${c.left}");
                                    </c:forEach>
                                    return result;
                                }()
                            }
                        ],
                        yAxis: [
                            {
                                type: 'value'
                            }
                        ],
                        series: [

                            {
                                name: '创新实现能力',
                                type: 'line',
                                data: function () {
                                    var result = [];
                                    <c:forEach var="c" items="${innovatePractical}">
                                    result.push(${c.right}.toFixed(2)
                                    )
                                    ;
                                    </c:forEach>
                                    return result;
                                }(),
                                markPoint: {
                                    data: [
                                        {type: "max", name: '最高'},
                                        {type: "min", name: '最低'}
                                    ]
                                },
                                markLine: {
                                    data: [
                                        {type: "average", name: '平均值'}
                                    ]
                                },
                                itemStyle: {normal: {color: 'rgb(230,182,0)'}}
                            }
                        ]
                    };
                    bar4.setOption(option4);
                    //创新基础条件
                    var option5 = {
                        title: {
                            text: '创新基础条件评价',
                            subtext: '纯属虚构'
                        },
                        tooltip: {
                            trigger: 'axis'
                        },
                        legend: {
                            data: ['创新基础条件']
                        },
                        toolbox: {
                            show: true,
                            feature: {
                                mark: {show: true},
                                dataView: {show: true, readOnly: false},
                                magicType: {show: true, type: ['line', 'bar']},
                                restore: {show: true},
                                saveAsImage: {show: true}
                            }
                        },
                        calculable: true,
                        xAxis: [
                            {
                                type: 'category',
                                data: function () {
                                    var result = [];
                                    <c:forEach var="c" items="${innovateFoundation}">
                                    result.push("${c.left}");
                                    </c:forEach>
                                    return result;
                                }()
                            }
                        ],
                        yAxis: [
                            {
                                type: 'value'
                            }
                        ],
                        series: [

                            {
                                name: '创新基础条件',
                                type: 'line',
                                data: function () {
                                    var result = [];
                                    <c:forEach var="c" items="${innovateFoundation}">
                                    result.push(${c.right}.toFixed(2)
                                    )
                                    ;
                                    </c:forEach>
                                    return result;
                                }(),
                                markPoint: {
                                    data: [
                                        {type: "max", name: '最高'},
                                        {type: "min", name: '最低'}
                                    ]
                                },
                                markLine: {
                                    data: [
                                        {type: "average", name: "平均值"}
                                    ],
                                },
                                itemStyle: {normal: {color: 'rgb(228,43,109)'}}

                            }
                        ]
                    };
                    bar5.setOption(option5);
                }
        );
    });
</script>
</html>
